#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main()
{
	int num1, num2,count=0;
	scanf("%d %d", &num1, &num2);
	for (int i = 31; i >= 0; i--)
	{
		if ((num1 & 1) != (num2 & 1))
			count++;
		num1 = num1 >> 1;
		num2 = num2 >> 1;
	}
	printf("%d", count);
	return 0;
}